<template>
	<view class="content">
		<view>这是articleDetail页面 </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				article: null,
			}
		},
		onLoad(option) {
			console.log("option = {}",option);
			//let option_article = JSON.parse(options.item);
			//this.article = option_article;
			//this.findArticleById(option.articleId);
		},
		onPullDownRefresh() {
			console.log("下拉刷新了");
		},
		methods: {
			async findArticleById(articleId){
				const res = await this.$myRequest({
					url:'/article/findArticleById?articleId'+articleId
				});
				/* console.log(res);
				console.log("根据id查询文章结束"); */
				this.article = res.data.data;
				//callBack && callBack();
			}
			/* findActivityById(activityId, principalId) {
				uni.request({
					header: {
						'content-type': 'application/json', //如果后台使用 @Reuqestbody的，使用这种方式
					},
					url: "http://localhost:8090/activity/findActivityById?activityId=" + activityId + "&principalId=" + principalId,
					method: "POST",
					//dataType: "json",
					timeout: 60000,
					success: res => {
						console.log(res);
						if (res.data.code == 200) {
							this.activity = res.data.data;
						} else {
							uni.showToast({
								title: "找不到该活动",
								icon: "none",
								mask: true,
								position: "top"
							}); 
						}
					}
				})
			} */
		}
	}
</script>

<style >

</style>
